#ifndef BUTTON_H_
#define BUTTON_H_

#include <iostream>
#include "../Widget.h"
#include "SDL/SDL_ttf.h"
#include "../../common/Constantes.h"
#include "../Listener.h"
#include "../../common/utils/Logger.h"
#include "../Parcel.h"
#include "../Event.h"

class Button: public Widget {

public:
	Button (std::string buttonName, std::string path, int posX, int posY, Widget* parent, Listener * listener);
	virtual ~Button();
	virtual void handleEvent(Event event);
	virtual void resolve();
	virtual void showOn(SDL_Surface* surface);


private:
	bool pressed;
	Parcel parcel;
	std::string buttonName;
	Listener* listener;
	SDL_Surface* pressedSurface;
	SDL_Surface* defaultSurface;
	SDL_Surface* activeSurface;

	bool mouseOver(Event event) const;

};

#endif /* BUTTON_H_ */
